package gameobjects
{
	import assets.Globals;
	import assets.Images;
	
	import com.greensock.TweenMax;
	import com.greensock.easing.Linear;
	
	import flash.events.Event;

	public class TowerProjectileOne extends TowerProjectile
	{
		public function TowerProjectileOne(dmgHP:Number=22, dmgSlow:Number=0, dmgShield:Number=0, passThrough:Boolean=false, passHops:int=2)
		{
			super(dmgHP, dmgSlow, dmgShield, passThrough, passHops);
			
			addChild(new Images.Projectile0());
			
			cs.x = 17;
			cs.y = 17;
			cs.graphics.beginFill(0xFF0000);
			cs.graphics.drawCircle(0, 0, 10);
			cs.graphics.endFill();
			cs.alpha = 0;
			
			addChild(cs);
		}
		
		override protected function init(event:Event):void
		{
			myTween = new TweenMax(this, 2, {  x: x+800, y : y, ease:Linear.easeNone });
			Globals.projectiles.push(this);
		}
		
		override public function destroy():void
		{
			myTween.kill();
			Globals.projectiles.splice(Globals.projectiles.indexOf(this), 1);
			super.destroy();
		}
	}
}